package Test_0723;

/**
 * Created with Intellij IDEA
 * Description:
 * User: 星辰
 * Dare: 2024-07-23
 */
public class Test {
    public static void main(String[] args) {
        /*Dog dog = new Dog(2,"小乖");
        Animal animal=dog;*/
        //Animal animal=new Dog(2,"小乖");
       /* Dog dog = new Dog(2,"小乖");
        func(dog);*/
        Animal animal=func2();
    }
    /*public static void func(Animal animal){
    }*/
    public static Animal func2(){
        Dog dog = new Dog(2,"小乖");
        return dog;
    }

}
